package com.github.iot.entity;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.NotNull;
import org.greenrobot.greendao.annotation.Generated;

/**
 * 服务端
 *
 * @Author: 梁声洪
 * @Date: 2019/12/15 18:26
 * @Version: v1.0.0
 */
@Entity
public class NetServer {

    /**
     * 主键ID
     */
    @Id(autoincrement = true)
    private Long id;

    /**
     * 服务端IP地址
     */
    @NotNull
    private String ip;

    /**
     * 服务端端口
     */
    @NotNull
    private Integer port;

    @Generated(hash = 2116274422)
    public NetServer(Long id, @NotNull String ip, @NotNull Integer port) {
        this.id = id;
        this.ip = ip;
        this.port = port;
    }

    @Generated(hash = 1576211270)
    public NetServer() {
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getIp() {
        return this.ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Integer getPort() {
        return this.port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

}